using WeatherSystem.API.Models;

namespace WeatherSystem.API.Repositories
{
    /// <summary>
    /// 天气数据Repository接口
    /// </summary>
    public interface IWeatherDataRepository : IRepository<WeatherDataEntry>
    {
        Task<WeatherDataEntry?> GetLatestByCityAsync(Guid cityId);
        Task<List<WeatherDataEntry>> GetHistoryAsync(Guid cityId, DateTime startDate, DateTime endDate);
        Task<PagedResult<Dictionary<string, object>>> GetWeatherDataPagedAsync(
            int page, int pageSize, Guid? cityId = null, 
            DateTime? startDate = null, DateTime? endDate = null, 
            string? source = null, string? sortBy = null, string? sortDirection = null);
        Task<List<WeatherDataEntry>> GetByCityAndDateRangeAsync(Guid cityId, DateTime startDate, DateTime endDate);
        Task<Dictionary<string, object>> GetWeatherDataAsDictionaryAsync(Guid entryId);
        Task<List<Dictionary<string, object>>> GetWeatherHistoryAsDictionaryAsync(Guid cityId, DateTime startDate, DateTime endDate);
    }
}